EXECUTABLE=7bw
SOURCES=main.cpp mainwindow.cpp scrollbar.cpp rect.cpp scrollskin.cpp \
	util.cpp app.cpp song.cpp patternview.cpp patterneditor.cpp \
        track.cpp instrument.cpp pattern.cpp songitem.cpp event.cpp font.cpp \
        keybindings.cpp rowlabel.cpp columnlabel.cpp midi.cpp player.cpp \
        transportview.cpp knobskin.cpp knob.cpp view.cpp tabview.cpp songview.cpp \
        editorview.cpp lib/tinyxml/tinyxml.cpp lib/tinyxml/tinyxmlerror.cpp \
        lib/tinyxml/tinyxmlparser.cpp lib/tinyxml/tinystr.cpp sbwindow.cpp \
	skin.cpp listview.cpp instrumentview.cpp songattrview.cpp button.cpp \
        buttonskin.cpp

CXX=g++
CXXFLAGS=-Wall -O0 -g3 
CPPFLAGS=-DTIXML_USE_STL -I/usr/local/include -I./lib/tinyxml
#CFLAGS=-O3 -I/usr/local/include
#CFLAGS=-pg -I/usr/local/include
LDFLAGS=`pkg-config --libs allegro-4.9 allegro_dialog-4.9 allegro_image-4.9 allegro_primitives-4.9` \
	-lm -lasound


OBJECTS=$(SOURCES:.cpp=.o)
DEPS=$(SOURCES:.cpp=.d)

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CXX) $(LDFLAGS) $(OBJECTS) -o $@

%.d: %.cpp
	$(CXX) -M $(CPPFLAGS) -o $*.d $<

-include $(DEPS)

clean: 
	rm -vf $(EXECUTABLE) *.o *.d
